﻿<%@ Page Culture="auto" UICulture="auto" Title="Vertical table display" Language="C#"
    MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="VerticalTableDisplay.aspx.cs"
    Inherits="BM.Tools.WebControls.MForm.Example.Display.Modifiers.VerticalTableDisplay" %>

<%@ Register Assembly="BM.Tools.WebControls.MForm" Namespace="BM.Tools.WebControls.MForm.Controls"
    TagPrefix="mf" %>
<%@ Register Assembly="BM.Tools.WebControls.MForm" Namespace="BM.Tools.WebControls.MForm.Controls.Additions"
    TagPrefix="mfadd" %>
<%@ Register Assembly="BM.Tools.WebControls.MForm" Namespace="BM.Tools.WebControls.MForm.Controls.Modifiers"
    TagPrefix="mfmod" %>
<%@ Register TagPrefix="mftitle" Namespace="BM.Tools.WebControls.MForm.Controls.Titles"
    Assembly="BM.Tools.WebControls.MForm" %>
<%@ Register TagPrefix="contents" TagName="ArtGallery" Src="~/Display/UserControls/ArtGalleryContent.ascx" %>
<%@ Register TagPrefix="contents" TagName="Museum" Src="~/Display/UserControls/MuseumContent.ascx" %>
<%@ Register TagPrefix="contents" TagName="Cinema" Src="~/Display/UserControls/CinemaContent.ascx" %>
<%@ Register TagPrefix="contents" TagName="Pub" Src="~/Display/UserControls/PubContent.ascx" %>
<%@ Register TagPrefix="contents" TagName="Restaurant" Src="~/Display/UserControls/RestaurantContent.ascx" %>
<asp:Content runat="server" ContentPlaceHolderID="Demonstration">
    <p>
        The items will be displayed as a table with each item being a new column.
    </p>
    <mf:RootValidator runat="server" ControlToValidate="Root1" />
    <mf:Root ID="Root1" runat="server">
        <UriMappings>
            <mf:UriMapping Prefix="xs" Namespace="http://www.w3.org/2001/XMLSchema"></mf:UriMapping>
            <mf:UriMapping Prefix="" Namespace=""></mf:UriMapping>
        </UriMappings>
        <Contents>
            <mf:Branch Name="CityActivities" runat="server">
                <Contents>
                    <mf:Branch Name="ArtGallery" runat="server" MaxOccurs="100" MinOccurs="0">
                        <Contents>
                            <contents:ArtGallery ID="ArtGallery1" runat="server" />
                        </Contents>
                        <Modifiers>
                            <mfmod:VerticalTableDisplayModifier />                                
                        </Modifiers>
                    </mf:Branch>
                    <mf:Branch Name="Museum" runat="server" MaxOccurs="100" MinOccurs="0">
                        <Contents>
                            <contents:Museum ID="Museum1" runat="server" />
                        </Contents>
                        <Modifiers>
                            <mfmod:VerticalTableDisplayModifier />
                        </Modifiers>
                    </mf:Branch>
                    <mf:Branch Name="Cinema" runat="server" MaxOccurs="100" MinOccurs="0">
                        <Contents>
                            <contents:Cinema ID="Cinema1" runat="server" />
                        </Contents>
                        <Modifiers>
                            <mfmod:VerticalTableDisplayModifier />
                        </Modifiers>
                    </mf:Branch>
                    <mf:Branch Name="Pub" runat="server" MaxOccurs="100" MinOccurs="0">
                        <Contents>
                            <contents:Pub ID="Pub1" runat="server" />
                        </Contents>
                        <Modifiers>
                            <mfmod:VerticalTableDisplayModifier />
                        </Modifiers>
                    </mf:Branch>
                    <mf:Branch Name="Restaurant" runat="server" MaxOccurs="100" MinOccurs="0">
                        <Contents>
                            <contents:Restaurant ID="Restaurant1" runat="server" />
                        </Contents>
                        <Modifiers>
                            <mfmod:VerticalTableDisplayModifier />
                        </Modifiers>
                    </mf:Branch>
                </Contents>
            </mf:Branch>
        </Contents>
    </mf:Root>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Description" runat="server">
    <p>
        The vertical table display can be added using the <code>VerticalTableDisplayModifier</code>
        modifier.
    </p>
    <p>
        With this display, each MForm item control is displayed as a column.
    </p>
    <p>
        To further customize the table, the <code>CellStyle</code> and <code>ColumnStyle</code>
        properties can be used.
    </p>
    <p>
        To change the settings of the table title, the <code>Title</code> can be used.
    </p>
    <p>
        Currently it is not possible to display items of different types in the same table,
        however this functionality is planned.
    </p>
    <div class="Remark">
        <p>
            For best results, the control with vertical table display specified should not have
            the content to complicated. The layout may get broken if this item has children
            that can be added.</p>
    </div>
</asp:Content>
